<?php /* Smarty version Smarty-3.1.18, created on 2015-09-24 10:26:54
         compiled from "E:\www\gfour\ws\Admin\View\Chat\rule_edit.html" */ ?>
<?php /*%%SmartyHeaderCode:2885756035f6e2d1f09-95656054%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '53d495cb15609cc97a8dbe936aa7dd1963c28093' => 
    array (
      0 => 'E:\\www\\gfour\\ws\\Admin\\View\\Chat\\rule_edit.html',
      1 => 1442596724,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2885756035f6e2d1f09-95656054',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    '_C' => 0,
    'rule' => 0,
    'id' => 0,
    'sid' => 0,
    '_L' => 0,
    'action' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_56035f6e3eb341_55962989',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_56035f6e3eb341_55962989')) {function content_56035f6e3eb341_55962989($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'E:\\www\\gfour\\ws\\Qiaqia\\Vendor\\Smarty\\plugins\\modifier.date_format.php';
?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/amazeui.min.css"/>
		<link rel="stylesheet" type="text/css" href="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
css/hy.admin.css"/>
	</head>
	<body>
	<div class="am-g">
		 <?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

		 <div class="am-g">
			<br>
			<div class="am-u-md-8 am-u-end">
				<form class="am-form am-form-horizontal hy-js-form">
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">规则名</label>
						<div class="am-u-sm-6">
							<input type="text" name="rule_name" value="<?php echo $_smarty_tpl->tpl_vars['rule']->value['rule_name'];?>
" placeholder="">
						</div>
						<div class="am-u-sm-3">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">类型</label>
						<div class="am-u-sm-6">
							<div class="am-btn-group hy-js-menutab" data-am-button="">
									<label data-target='#link1' class="hy-js-menubtn am-btn am-btn-default am-btn-xs <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']) {?><?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==1) {?>am-active <?php } else { ?><?php }?><?php } else { ?>am-active <?php }?>">
										<input type="radio" <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']) {?><?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==1) {?>checked="checked" <?php } else { ?><?php }?><?php } else { ?>checked="checked" <?php }?> name="status" value="1" id="option1">时间规则
									</label>
									<label data-target='#link2' class="hy-js-menubtn am-btn am-btn-default am-btn-xs<?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==2) {?> am-active <?php } else { ?><?php }?>">
										<input type="radio" name="status" <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==2) {?>checked="checked" <?php } else { ?><?php }?> value="2" id="option2"> 评论规则
									</label>
									<label data-target='#link3' class="hy-js-menubtn am-btn am-btn-default am-btn-xs<?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==3) {?> am-active <?php } else { ?><?php }?> lay_date_s1">
										<input type="radio" name="status" <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==3) {?>checked="checked" <?php } else { ?><?php }?> value="3" id="option2"> 每日时间规则
									</label>
									<label data-target='#link3' class="hy-js-menubtn am-btn am-btn-default am-btn-xs<?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==4) {?> am-active <?php } else { ?><?php }?> lay_date_s2">
										<input type="radio" name="status" <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==4) {?>checked="checked" <?php } else { ?><?php }?> value="4" id="option2"> 单日时间规则
									</label>
								</div>
						</div>
						<div class="am-u-sm-3">
						</div>
					</div>
					
					
					<div id='link1' <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']) {?><?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==1) {?>style='display: block;'<?php } else { ?><?php }?><?php } else { ?>style='display: block;'<?php }?>  class="am-form-group am-g am-margin-top hy-js-menupanel hy-hide">
						<label for="user-name" class="am-u-sm-3 am-form-label">	时间（秒）</label>
						<div class="am-u-sm-6">
							<input type="text" id="showtime" name="showtime" <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==1) {?> value="<?php echo $_smarty_tpl->tpl_vars['rule']->value['showtime'];?>
" <?php } else { ?> value="0"<?php }?> >
						</div>
						<div class="am-u-sm-3">
						</div>
					</div>
					<div id='link2' <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==2) {?>style='display: block;'<?php }?> class="am-form-group am-g am-margin-top hy-js-menupanel hy-hide">
						<label for="user-name" class="am-u-sm-3 am-form-label">	评论条数</label>
						<div class="am-u-sm-6">
							<input type="text" id="comment_num" name="comment_num" <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==2) {?> value="<?php echo $_smarty_tpl->tpl_vars['rule']->value['comment_num'];?>
" <?php } else { ?> value="0"<?php }?>>
						</div>
						<div class="am-u-sm-3">
						</div>
					</div >
					<div id='link3'  <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==3) {?>style='display: block;'<?php }?> class="am-form-group am-g am-margin-top hy-js-menupanel hy-hide">
							<label for="user-name" class="am-u-sm-3 am-form-label">	具体时间</label>
						<div class="am-u-sm-6">
							<input type="text" id="specific_time" name="specific_time" <?php if ($_smarty_tpl->tpl_vars['rule']->value['status']==3||$_smarty_tpl->tpl_vars['rule']->value['status']==4) {?> value="<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['rule']->value['specific_time'],'Y-m-d H:i:s');?>
" <?php } else { ?> value="" <?php }?>>
							
						</div>
						<div style=" margin-top: 5px;"  class="am-u-sm-3">
						</div>
					</div>
					
					<div class="am-form-group">
						<div class="am-u-sm-9 am-u-sm-push-3">
							<input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
">
							<input type="hidden" name="sid" value="<?php echo $_smarty_tpl->tpl_vars['sid']->value;?>
">
							<button type="button" class="am-btn am-btn-primary hy-js-submit"><?php echo $_smarty_tpl->tpl_vars['_L']->value['SAVE'];?>
</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	  <?php echo $_smarty_tpl->getSubTemplate ('../Common/hy_footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

	<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/editor/kindeditor.js"></script>
	<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['_C']->value['hy_path'];?>
js/laydate/laydate.js"></script>
	<script type="text/javascript">
		$(function(){
			laydate({
			   elem: '#specific_time',
			   istime:true,
			   format: 'YYYY-MM-DD hh:mm:ss',
			})
		})
	    hy_submit('index.php?g=admin&m=chat&a=<?php echo $_smarty_tpl->tpl_vars['action']->value;?>
','',function(result){
			var value = $("input[name='status']:checked").val();
			if(value==1){
				$("#comment_num").val(0);
			}else if(value==2){
				$("#showtime").val(0);
			}
			showMsg(result.content,result.error);
			parent.$('#adrule_<?php echo $_smarty_tpl->tpl_vars['sid']->value;?>
').attr('src', parent.$('#adrule_<?php echo $_smarty_tpl->tpl_vars['sid']->value;?>
').attr('src'));
		});
	</script>
	</body>
</html>
<?php }} ?>
